import React from "react";
import { Space, Swiper} from "antd-mobile";
import yin1 from "./images/yin1.jpg";
import yin2 from "./images/yin2.jpg";
import yin3 from "./images/yin3.jpg";
import { useNavigate } from "react-router-dom";
import styles from "./index.module.css";


const Index: React.FC = () => {
const navigate = useNavigate();
const lead = ()=>{
  navigate('/')
}
  return (
    <div>
      <Space direction="vertical" block>
        <Swiper
          style={{
            "--border-radius": "8px",
          }}
          defaultIndex={0}
        >
          <Swiper.Item>
            <div className={styles.content}>
              <img src={yin1} alt="" />
            </div>
          </Swiper.Item>
          <Swiper.Item>
            <div className={styles.content}>
              <img src={yin2} alt="" />
            </div>
          </Swiper.Item>
          <Swiper.Item>
            <div className={styles.content}>
              <img src={yin3} alt="" />
              <button onClick={lead}>立即体验 →</button>
            </div>
          </Swiper.Item>
        </Swiper>
      </Space>
    </div>
  );
};

export default Index;
